<template>
	<view class="container">
		<u-navbar
			:is-fixed="false"
			:border-bottom="false"
			:is-back="true"
			title="设置"
			:background="{ background: '#fff' }"
			title-color="#000"
		>
		</u-navbar>
		<view>	
			<view @click="updateUserInfo" class="row" hover-class="none" hover-stop-propagation="false">
				修改个人信息
			</view>
			<view @click="updatePassword" class="row" hover-class="none" hover-stop-propagation="false">
				修改密码
			</view>


			<view class="btns">
				<button class="submit" @click="logout">退出登录</button>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			
		}
	},
	methods: {
    updatePassword() {
      this.$u.route('/pages/interest/updatePassword', {
        userInfo: JSON.stringify(this.userInfo)
      })
    },
    updateUserInfo() {
      this.$u.route('/pages/interest/updateUserInfo', {
        userInfo: JSON.stringify(this.userInfo)
      })
    },
    logout() {
      uni.removeStorage({
        key:'userInfo',
        success: () => {
			    this.$u.route('/pages/interest/login')
        }
      })
    },
	}
}
</script>

<style lang="scss" scoped>
.container {
  min-height: 100vh;
  background: #fafafa;
}
.submit {
  border: 1px solid #999;
  width: calc(100% - 40rpx);
  height: 86rpx;
  line-height: 86rpx;
  box-sizing: border-box;
  border-radius: 40rpx;
  color: #000;
	background: #fff;

  &::after {
    content: none;
  }

  &::before {
    content: none;
  }

  &[disabled='true'] {
    background: #e4e4e4;
    font-size: 36rpx;
    font-family: Source Han Sans CN;
    font-weight: 500;
    color: #ffffff;
  }
}

.btns {
  padding: 30rpx;
	position: fixed;
	bottom: 30rpx;
	width: 100%;
}
.row {
	width: 100%;
	height: 80rpx;
	line-height: 60rpx;
	padding: 14rpx 20rpx;
	background: #fff;
	margin-bottom: 10rpx;
}
</style>
